package com.hhkj.study.api.user.sevice.biz;

import com.hhkj.study.admin.order.model.podo.OrderItemDo;
import com.hhkj.study.api.user.model.req.ApiCustomerUserCourseBaseReq;
import com.hhkj.study.api.user.model.res.ApiCustomerUserCourseRes;
import com.hhkj.study.api.user.model.res.ApiCustomerUserStudyReportRes;
import com.hhkj.study.api.user.model.res.ApiUserCourseStudyRecordRes;
import com.hhkj.study.common.model.req.CourseVideoReq;

import java.util.List;

/**
 * @Author luowu
 * @Date 2024/10/12 涵 11:57:23
 */
public interface ApiUserCourseBizService {


    /**
     * 用户课程详情 通过订单和课程id查询
     * @param userId
     * @param courseId
     * @param orderItemId
     * @return
     */
    ApiCustomerUserCourseRes userCourseByCourseId(Long userId, Long courseId, Long orderItemId);

    /**
     * 用户该订单下该课程的学习情况统计
     * @param userId 用户id
     * @param courseId 课程id
     * @param orderItemId 订单id
     * @return
     */
    ApiUserCourseStudyRecordRes getUserCourseStudyRecord(Long userId, Long courseId, Long orderItemId);

    /**
     * 用户下单后生成学习记录
     * @param itemList
     * @return
     */
    boolean userCourseStudyRecordSave(List<OrderItemDo> itemList);

    /**
     * 用户下单后生成外部系统账号
     * @param itemList
     * @return
     */
    boolean userCourseGenerateOutSystemAccount(List<OrderItemDo> itemList);


    /**
     * 用户课程学习统计
     * @param req
     * @return
     */
    ApiCustomerUserStudyReportRes courseStudyReport(ApiCustomerUserCourseBaseReq req);

    /**
     * 给某些课程增加/减少视频
     * @param req
     * @return
     */
    boolean addCourseVideo(CourseVideoReq req);
}
